package com.platform.base.common.controller;

import com.platform.base.common.dto.Result;
import org.springframework.validation.annotation.Validated;

@Validated
public class BaseController {
    protected <T> Result<T> ok(T t) {
        return new Result(t);
    }

    protected <T> Result<T> ok() {
        return new Result(true, null);
    }

    protected Result error(String msg) {
        return new Result(false, msg);
    }
}
